"""Show information about a single participant. It might be you! """ import locale import requests from aspen import json, Response from aspen.utils import to_age from gittip import AMOUNTS from gittip.utils import get_participant, wrap MAKING = "I am making the world better by" LONG_STATEMENT = 256 def _clip(text, n): text = text.replace('\n', ' ') if len(text) > n: text = text[:(n - 4)] + '...' return text # ========================================================================== ^L participant = get_participant(request, restrict=False) locked = False tip_or_pledge = "tip" hero = "Profile" title = participant.username # used in the title tag username = participant.username # used in footer shared with on/$platform/ # pages github_account, twitter_account, bitbucket_account = participant.get_accounts_elsewhere() long_statement = len(participant.statement) > LONG_STATEMENT # ========================================================================== ^L {% extends templates/profile.html %} {% block head %} {% if participant.statement %} {% else %} {% end %} {% end %} {% block page %} {% if user == participant %}
{% include "templates/profile-edit.html" %}
{% else %}
{% if participant.statement %}

Statement

{{ MAKING }} {{ wrap(participant.statement) }}
{% else %}
{% end %}

Funding Goal

{% if participant.goal is None %} I'm grateful for gifts, but I don't have a specific funding goal. {% elif participant.goal == 0 %} I'm here as a patron. {% else %} My goal is to receive ${{ locale.format("%.2f", participant.goal, grouping=True) }} per week on Gittip. {% end %}
{% include "templates/connected-accounts.html" %}
{% end %} {% end %}